package services;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import modelo.Insumo;
import modelo.Tiposuscripcion;
import dao.InsumoDao;
import dao.TipoSuscripcionDao;

@ManagedBean(name = "insumoService", eager = true)
@ApplicationScoped
public class InsumoService implements Serializable {

	private static final long serialVersionUID = -2612283331935537683L;
	private Insumo insumo;
	private List<Insumo> listaInsumo;
	private InsumoDao insumoDao;

	public InsumoService() {
		super();
		this.insumo = new Insumo();
		this.listaInsumo = new ArrayList<Insumo>();
		this.insumoDao = new InsumoDao();

		listaInsumo = insumoDao.obtenerInsumos();
	}

	public Insumo getInsumo() {
		return insumo;
	}

	public void setInsumo(Insumo insumo) {
		this.insumo = insumo;
	}

	public List<Insumo> getListaInsumo() {
		return listaInsumo;
	}

	public void setListaInsumo(List<Insumo> listaInsumo) {
		this.listaInsumo = listaInsumo;
	}

	public InsumoDao getInsumoDao() {
		return insumoDao;
	}

	public void setInsumoDao(InsumoDao insumoDao) {
		this.insumoDao = insumoDao;
	}

	public List<Insumo> obtenerInsumosMenu(Integer a)
	{
		List<Insumo> b = new ArrayList<Insumo>();
		return b;
	}

}
